With the development of the Internet, the Internet Protocol version 6 (IPv6) will replace Internet Protocol version 4 (IPv4) and become a next generation Internet Protocol (IP). One prominent feature of the IPv6 is that IPv6 supports automatic configuration of a network node address, which greatly reduces the workload of a network manager. When an address is automatically configured by using IPv6, to prevent the case that two subscribers use the same IP address, duplicate address detection (DAD) must be performed before a subscriber uses an IPv6 unicast address, that is, it should be determined that whether the IPv6 unicast address is used by another subscriber, so as to ensure the uniqueness of the IP address.
To support IPv6, usually a terminal needs to support the DAD function. The digital subscriber line (DSL) is for point to point (P2P) transmission, but not a shared medium, and therefore two DSL terminals may not directly communicate. Terminals on a passive optical network (PON) are isolated. On the N:1 virtual local area network (VLAN), N>2, user ports on a network device are isolated even in the same VLAN, the network device does not forward DAD packets of other subscribers to a subscriber. N:1 VLAN refers to modifying VLAN IDs, which are carried in packets sent from N VLANs, to the same VLAN ID. Therefore, the DAD function in the above scenario is disabled, and consequently the address may not be automatically configured.
The neighbor discovery proxy (ND proxy) is used to forward a DAD multicast packet to implement the DAD function. The specific procedure may refer to FIG. 1, each subscriber is connected to one network, and subscriber 1 sends a DAD-neighbor solicitation (DAD-NS) multicast packet to the ND proxy by using an intermediate Layer 2 access network 1 (AN1). After receiving the packet, port 1 of the ND proxy modifies the link-local address (LLA) and source-media access control (S-MAC) which are contained in the packet, and unconditionally forwards a modified multicast packet to other ports of the ND proxy. For example, after receiving the modified packet, port 2 sends the modified packet to subscriber 2 by using an intermediate Layer 2 AN2.
Although the ND proxy may be used to forward the multicast packet used as a DAD-NS message, the ND proxy unconditionally forwards a received DAD-NS multicast packet to other ports except the port which has received the packet. In practice, only a few subscribers on the ports on the network use duplicate addresses. If the multicast packet is forwarded to all other ports, not only resources are wasted but also a large amount of bandwidth is consumed. In addition, the DAD-NS multicast packet is forwarded to other subscribers so that other subscribers may easily obtain the address and other related information of the subscriber from the packet, which produces security risks. Further, the DAD-NS multicast packet is forwarded to other subscribers by using the ND proxy. Therefore, the delay of the detection is prolonged and the most severe problem is that the DAD fails to be performed over subscribers on the same port of the ND proxy, for example, subscriber 3. In addition, there is a high probability that prefixes on the same port are the same and the addresses are duplicate. Therefore, the DAD function is not correct and the automatic address configuration may not be correctly implemented.